#-------------------------------------------------
#
# Project created by QtCreator 2008-11-30T18:49:19
#
#-------------------------------------------------

############# Comment out this line if you don't want qt support ###############
QT_SUPPORT = true
################################################################################

if($$QT_SUPPORT) {

} else {
    CONFIG -= qt
}

TARGET = plite
TEMPLATE = lib
CONFIG += dll debug #lib_bundle

DEFINES += PREVALENTLITE_LIBRARY

SRC_DIR = src
HEADER_DIR = include

################### Setup mac framework ################
QMAKE_LFLAGS += -L/path/to/framework/directory/
# FRAMEWORK_HEADERS.version = 0.1
# FRAMEWORK_HEADERS.files = $$HEADER_DIR
# FRAMEWORK_HEADERS.path = $$HEADER_DIR
# QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS

################### Setup install vars #################3
includes.path = /usr/local/include/plite
lib.path = /usr/local/lib

################### STD DATA TYPES #####################
SOURCES += $$SRC_DIR/plBool.cpp \
           $$SRC_DIR/plLongLong.cpp \
           $$SRC_DIR/plInt.cpp \
           $$SRC_DIR/plString.cpp \
           $$SRC_DIR/plDouble.cpp \
           $$SRC_DIR/plByteArray.cpp

HEADERS += $$HEADER_DIR/plBool.h \
           $$HEADER_DIR/plLongLong.h \
           $$HEADER_DIR/plInt.h \
           $$HEADER_DIR/plString.h \
           $$HEADER_DIR/plList.h \
           $$HEADER_DIR/plPointer.h \
           $$HEADER_DIR/plByteArray.h

################### QT Data Types ######################
if($$QT_SUPPORT) {
    #message("I get here");
    QT_SRC_DIR = $$SRC_DIR/qt
    SOURCES += $$QT_SRC_DIR/plQString.cpp \
                $$QT_SRC_DIR/plQDatabase.cpp

    HEADERS += $$HEADER_DIR/plQString.h \
               $$HEADER_DIR/plQList.h \
                $$HEADER_DIR/plQDatabase.h

}

################### Database Code #######################
SOURCES +=    $$SRC_DIR/plDatabase.cpp \
            $$SRC_DIR/plFactory.cpp \
            $$SRC_DIR/plFactoryElement.cpp \
            $$SRC_DIR/plObject.cpp \
            $$SRC_DIR/plMemory.cpp \
            $$SRC_DIR/plData.cpp

HEADERS +=    $$HEADER_DIR/plDatabase.h \
                $$HEADER_DIR/plFactory.h \
                $$HEADER_DIR/plFactoryElement.h \
                $$HEADER_DIR/plObject.h \
                $$HEADER_DIR/plMemory.h \
                $$HEADER_DIR/plData.h

################### Where things are installed ###########

INCLUDEPATH += $$HEADER_DIR
DEPENDPATH += $$HEADER_DIR $$SRC_DIR

unix:LIBS += -lsqlite3
mac:LIBS += -install_name /Users/RyDawg/Desktop/philip/prevalentlite/libplite.1.dylib

includes.files += $$HEADER_DIR/*
#lib.files += libplite.so*
#INSTALLS += includes lib
target.path = /usr/local/lib
INSTALLS += target includes
